package com.yedean.mall.controller;

/**
 * FeignAdminController
 *
 * @author yedean
 * @date 2022/8/3
 */

import com.yedean.mall.api.CommonResult;
import com.yedean.mall.service.FeignAdminService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * Feign调用mall-admin接口示例
 * @author yedean
 */
@Api(tags = "Feign调用mall-admin接口示例")
@RestController
@RequestMapping("/feign/admin")
public class FeignAdminController {
    
    @Autowired
    private FeignAdminService adminService;


    @GetMapping("/menu/{id}")
    public CommonResult<?> getItem(@PathVariable Long id){
        return adminService.getItem(id);
    }
    
    @GetMapping("/health")
    public String checkHealthy(){
        return adminService.checkHealthy();
    }
    
    
}
